<template>
    <div>
        <BlogCategory :category-list="categoryListRef" :category-id="categoryIdRef"></BlogCategory>
    </div>
    <button @click="categoryIdRef++">add</button>
</template>
<script setup lang='ts'>
import { ref, watchEffect } from 'vue';
import BlogCategory from './BlogCategory.vue'
import { getBlogCategories } from '~@/api/blog';
import { TypeApiBlogCategoryI } from '~@/api/apiTypes';

const categoryListRef=ref<TypeApiBlogCategoryI[]>([]);
const categoryIdRef=ref(4);

watchEffect(async ()=>{
    categoryListRef.value=await getBlogCategories();
})



    ////#region defineXxx
    //defineOptions({
        //name:
    //});

    //const props=defineProps({
        //propA:{
            //type:String,
            //required:true
        //},
        //propB:{
            //type:Number,
            //default:1
        //},
        //propC:{
            //type:String as PropType<MyType>,
            //required:true
        //},
    //});

    //const emit = defineEmits<{
        //event1:[para1:number,para2:string],
        //event2:[para1:number,para2:string],
    //}>();
    ////#endregion


    
    
</script>
<style lang='less' scoped>
    
</style>